﻿/*
 * @Autor: PK
 * @Date: 2022/04/16 02:48:SS
 */

using ShkSimulation.core.dao.input.loader;
using ShkSimulation.core.dao.output.result;

namespace ShkSimulation.core.dao.output {

	public class ExcelResultShower :ResultShower{

		private string filePath;

		public ExcelResultShower(string filePath) {
			this.filePath = filePath;
		}

		public void Show(Result result) {
			DataTableResourceResult resourceResult = new DefaultDataTableResourceResult(result);
			ResourceLoader loader = new ExcelResourceLoader();
			loader.SaveData(resourceResult, filePath);
		}

	}

}